# -*- mode: python; -*-
#
# Copyright (c) 2016 Juniper Networks, Inc. All rights reserved.
#

import sys
Import('AgentEnv')
env = AgentEnv.Clone()
except_env = AgentEnv.RemoveExceptionFlag(env)
SandeshGenFiles = env.SandeshGenCpp('resource_manager.sandesh')
SandeshGenSrcs = env.ExtractCpp(SandeshGenFiles)
sandesh_objs = AgentEnv.BuildExceptionCppObj(env, SandeshGenSrcs)

libresource_manager = env.Library('resource_manager',
                                     sandesh_objs +
                                     [ 'resource_manager.cc',
                                       'resource_table.cc',
                                       'resource_cmn.cc',
                                       'index_resource.cc',
                                       'mpls_index.cc',
                                       'vm_interface_index.cc',
                                       'vrf_index.cc',
                                       'qos_index.cc',
                                       'bgp_as_service_index.cc',
                                       'mirror_index.cc',
                                       'resource_backup.cc',
                                       except_env.Object('sandesh_map.cc'),
                                     ])

env.SConscript('test/SConscript', exports='AgentEnv', duplicate = 0)
